package data.service

import data.network.ApiResponse
import data.network.AuthenticationResponse
import data.network.BanTin
import data.network.Football
import data.network.LoginRequest
import data.network.WeatherResponse
import retrofit2.Call
import retrofit2.http.Body
import retrofit2.http.DELETE
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path
import retrofit2.http.Query

interface NewsService {
    @GET("/api/news/category/{category}")
    fun getBanTin(
        @Path("category") category: String?
    ): Call<ApiResponse<List<BanTin>>>

    @GET("/api/news/full")
    fun getFullBanTin(): Call<ApiResponse<List<BanTin>>>


    /**
     * ref link: https://free-football-soccer-videos.p.rapidapi.com/
     */
    @GET("/api/football")
    fun getFootballData(): Call<ApiResponse<List<Football>>>

    @GET("weather")
    fun getCurrentWeather(
        @Query("q") city: String,
        @Query("appid") apiKey: String
    ): Call<WeatherResponse>

    @POST("/api/auth/signin")
    fun login(
        @Body loginRequest: LoginRequest
    ): Call<ApiResponse<AuthenticationResponse>>


    @DELETE("/api/post/all")
    fun deleteAllPostNews(): Call<Unit>

}